<?php
/* 
* @Author: LDF QQ 47121862
* @Date:   2014-06-06 11:04:45
* @Last Modified by:   LDF QQ 47121862
* @Last Modified time: 2014-06-06 11:17:28
*/
class SearchControl extends Control{
	function index(){
		$sname=Q('sname');
		$SQL="SELECT gid,gname,price,addtime,index_pic,bid,cid FROM hd_g_goods WHERE gname LIKE '%{$sname}%' ORDER BY gid DESC";
		$this->goods = M()->query($SQL);
		//查询搜索关键字列出所有商品
		$this->display();
	}
}
